package com.sitanyun.merchant.guide.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sitanyun.merchant.guide.R;
import com.sitanyun.merchant.guide.bean.AnalysDialsBean;
import com.sitanyun.merchant.guide.weiht.ToolsUtil;

/**
 * Created by
 * on 2022/3/25.
 * 用户分析详情适配器
 */
public class AnalysDiailsAdapter extends BaseQuickAdapter<AnalysDialsBean.DataBean.RecordsBean, BaseViewHolder> {

    public AnalysDiailsAdapter(Context context) {
        super(R.layout.layout_alalys);
        this.mContext = context;
    }

    /**
     * @param helper
     * @param item
     */
    @Override
    protected void convert(BaseViewHolder helper, AnalysDialsBean.DataBean.RecordsBean item) {
         //赋值
        helper.setText(R.id.tv_uname,item.getUsername()+"");
        helper.setText(R.id.tv_uphone,item.getPhone()+"");
        helper.setText(R.id.tv_ubrose,item.getBrowseCnt()+"");
        //转换时间
        int intTime=item.getBrowseTime();
        helper.setText(R.id.tv_ubrosenum, ToolsUtil.timeConversion(intTime));

        helper.setText(R.id.tv_ushar,item.getBrowseSceneCnt()+"");
        helper.setText(R.id.tv_usharnum,item.getCallCnt()+"");
        helper.setText(R.id.tv_umeeting,item.getInterpretCnt()+"");
        int intTimes=item.getInterpretTime();

        helper.setText(R.id.tv_umeetingnum,ToolsUtil.timeConversion(intTimes));
    }
}
